import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 公共样式
import './common.css'
// import '@/assets/font/font.css'
//复制功能插件
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)

Vue.config.productionTip = false

// axios
import axios from 'axios'
axios.defaults.withCredentials = true;
// axios回调拦截
axios.interceptors.response.use(
  response => {
    // 处理响应数据
    return response
  }, 
  error => {
    // 处理响应失败
    // 跳转到无网络页面
    window.location.href = '/no-net'
    return Promise.reject(error)
})
//全局封装axios请求
Vue.prototype.$axios = axios

// vant
import { Lazyload, Dialog } from 'vant'
Vue.use(Lazyload).use(Dialog)
// vant ---over

//公共路径
// global.url_g = 'http://139.196.254.231/webadmin/api'
global.url_g = '/webadmin/api'

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
